﻿// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。
//
// 本项目主要遵循 MIT 许可证和 Apache 许可证（版本 2.0）进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。
//
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动！任何基于本项目二次开发而产生的一切法律纠纷和责任，我们不承担任何责任！

using Admin.NET.Core;
using Magicodes.ExporterAndImporter.Core;
using System.ComponentModel.DataAnnotations;

namespace Admin.NET.Application;

/// <summary>
/// 来料检验基础输入参数
/// </summary>
public class incomingBaseInput
{
    /// <summary>
    /// 主键Id
    /// </summary>
    public virtual long? Id { get; set; }
    
    /// <summary>
    /// 物料
    /// </summary>
    public virtual long? material { get; set; }
    
    /// <summary>
    /// 检验方案
    /// </summary>
    public virtual long? scheme { get; set; }
    
    /// <summary>
    /// 批次号
    /// </summary>
    public virtual string? batch { get; set; }
    
    /// <summary>
    /// 供应商
    /// </summary>
    public virtual string? vendor { get; set; }
    
    /// <summary>
    /// 数量
    /// </summary>
    public virtual int? batchnumber { get; set; }
    
}

/// <summary>
/// 来料检验分页查询输入参数
/// </summary>
public class PageincomingInput : BasePageInput
{
    /// <summary>
    /// 物料
    /// </summary>
    public long? material { get; set; }
    
    /// <summary>
    /// 检验方案
    /// </summary>
    public long? scheme { get; set; }
    
    /// <summary>
    /// 批次号
    /// </summary>
    public string? batch { get; set; }
    
    /// <summary>
    /// 供应商
    /// </summary>
    public string? vendor { get; set; }
    
    /// <summary>
    /// 数量
    /// </summary>
    public int? batchnumber { get; set; }
    
    /// <summary>
    /// 单号
    /// </summary>
    public string? Order { get; set; }
    
    /// <summary>
    /// 状态
    /// </summary>
    public bool? status { get; set; }
    
    /// <summary>
    /// 结果
    /// </summary>
    public string? results { get; set; }
    
    /// <summary>
    /// 审核人
    /// </summary>
    public string? Auditer { get; set; }
    
    /// <summary>
    /// 审核时间范围
    /// </summary>
     public DateTime?[] AudittimeRange { get; set; }
    
    /// <summary>
    /// 审核备注
    /// </summary>
    public string? Auditremark { get; set; }
    
    /// <summary>
    /// 选中主键列表
    /// </summary>
     public List<long> SelectKeyList { get; set; }
}

/// <summary>
/// 来料检验增加输入参数
/// </summary>
public class AddincomingInput
{
    /// <summary>
    /// 物料
    /// </summary>
    public long? material { get; set; }
    
    /// <summary>
    /// 检验方案
    /// </summary>
    public long? scheme { get; set; }
    
    /// <summary>
    /// 批次号
    /// </summary>
    [MaxLength(32, ErrorMessage = "批次号字符长度不能超过32")]
    public string? batch { get; set; }
    
    /// <summary>
    /// 供应商
    /// </summary>
    [MaxLength(32, ErrorMessage = "供应商字符长度不能超过32")]
    public string? vendor { get; set; }
    
    /// <summary>
    /// 数量
    /// </summary>
    public int? batchnumber { get; set; }
    
}

/// <summary>
/// 来料检验删除输入参数
/// </summary>
public class DeleteincomingInput
{
    /// <summary>
    /// 主键Id
    /// </summary>
    [Required(ErrorMessage = "主键Id不能为空")]
    public long? Id { get; set; }
    
}

/// <summary>
/// 来料检验更新输入参数
/// </summary>
public class UpdateincomingInput
{
    /// <summary>
    /// 主键Id
    /// </summary>    
    [Required(ErrorMessage = "主键Id不能为空")]
    public long? Id { get; set; }
    
    /// <summary>
    /// 物料
    /// </summary>    
    public long? material { get; set; }
    
    /// <summary>
    /// 检验方案
    /// </summary>    
    public long? scheme { get; set; }
    
    /// <summary>
    /// 批次号
    /// </summary>    
    [MaxLength(32, ErrorMessage = "批次号字符长度不能超过32")]
    public string? batch { get; set; }
    
    /// <summary>
    /// 供应商
    /// </summary>    
    [MaxLength(32, ErrorMessage = "供应商字符长度不能超过32")]
    public string? vendor { get; set; }
    
    /// <summary>
    /// 数量
    /// </summary>    
    public int? batchnumber { get; set; }
    
}

/// <summary>
/// 来料检验主键查询输入参数
/// </summary>
public class QueryByIdincomingInput : DeleteincomingInput
{
}

/// <summary>
/// 下拉数据输入参数
/// </summary>
public class DropdownDataincomingInput
{
    /// <summary>
    /// 是否用于分页查询
    /// </summary>
    public bool FromPage { get; set; }
}

/// <summary>
/// 来料检验数据导入实体
/// </summary>
[ExcelImporter(SheetIndex = 1, IsOnlyErrorRows = true)]
public class ImportincomingInput : BaseImportInput
{
    /// <summary>
    /// 物料 关联值
    /// </summary>
    [ImporterHeader(IsIgnore = true)]
    [ExporterHeader(IsIgnore = true)]
    public long? material { get; set; }
    
    /// <summary>
    /// 物料 文本
    /// </summary>
    [ImporterHeader(Name = "物料")]
    [ExporterHeader("物料", Format = "", Width = 25, IsBold = true)]
    public string materialFkDisplayName { get; set; }
    
    /// <summary>
    /// 检验方案 关联值
    /// </summary>
    [ImporterHeader(IsIgnore = true)]
    [ExporterHeader(IsIgnore = true)]
    public long? scheme { get; set; }
    
    /// <summary>
    /// 检验方案 文本
    /// </summary>
    [ImporterHeader(Name = "检验方案")]
    [ExporterHeader("检验方案", Format = "", Width = 25, IsBold = true)]
    public string schemeFkDisplayName { get; set; }
    
    /// <summary>
    /// 批次号
    /// </summary>
    [ImporterHeader(Name = "批次号")]
    [ExporterHeader("批次号", Format = "", Width = 25, IsBold = true)]
    public string? batch { get; set; }
    
    /// <summary>
    /// 供应商
    /// </summary>
    [ImporterHeader(Name = "供应商")]
    [ExporterHeader("供应商", Format = "", Width = 25, IsBold = true)]
    public string? vendor { get; set; }
    
    /// <summary>
    /// 数量
    /// </summary>
    [ImporterHeader(Name = "数量")]
    [ExporterHeader("数量", Format = "", Width = 25, IsBold = true)]
    public int? batchnumber { get; set; }
    
    /// <summary>
    /// 单号
    /// </summary>
    [ImporterHeader(Name = "单号")]
    [ExporterHeader("单号", Format = "", Width = 25, IsBold = true)]
    public string? Order { get; set; }
    
    /// <summary>
    /// 状态
    /// </summary>
    [ImporterHeader(Name = "状态")]
    [ExporterHeader("状态", Format = "", Width = 25, IsBold = true)]
    public bool? status { get; set; }
    
    /// <summary>
    /// 结果
    /// </summary>
    [ImporterHeader(Name = "结果")]
    [ExporterHeader("结果", Format = "", Width = 25, IsBold = true)]
    public string? results { get; set; }
    
    /// <summary>
    /// 审核人
    /// </summary>
    [ImporterHeader(Name = "审核人")]
    [ExporterHeader("审核人", Format = "", Width = 25, IsBold = true)]
    public string? Auditer { get; set; }
    
    /// <summary>
    /// 审核时间
    /// </summary>
    [ImporterHeader(Name = "审核时间")]
    [ExporterHeader("审核时间", Format = "", Width = 25, IsBold = true)]
    public DateTime? Audittime { get; set; }
    
    /// <summary>
    /// 审核备注
    /// </summary>
    [ImporterHeader(Name = "审核备注")]
    [ExporterHeader("审核备注", Format = "", Width = 25, IsBold = true)]
    public string? Auditremark { get; set; }
    
}
